namespace TestGen.SqlServer.BL
{

    public partial class BL_Customer
    {


































    //public static object SelectFilter(Database db, Data.Customer__Filter filter, EnumDbFilter mode = EnumDbFilter.AndLike, bool concurrency = false, int commandTimeout = 30)
    //{
    //    string sql = '[Sql] {0} {1} {2}';

    //    StringBuilder where = new StringBuilder();
    //    string op = mode == EnumDbFilter.AndLike ? "AND" : "OR ";

    //    List<[TypeName]> list = new List<[TypeName]>();

    //    using (var cmd = db.NewCommand("", commandTimeout, CommandType.Text))
    //    {
    //        if (filter.CustomerId != null)
    //        {
    //            db.AddWithValue(cmd, "@CustomerId", filter.CustomerId);
    //            where.AppendFormat("(CustomerId {0} {1} )  {2} ", DbUtil.GetSqlOperation(filter.CustomerIdOperation), "@CustomerId", op);
    //        }

    //        string whereStr = "";
    //        if (where.Length > 0)
    //        {
    //            whereStr = where.ToString().Trim();
    //            whereStr = whereStr.Substring(0, whereStr.Length - 3);
    //        }

    //        cmd.CommandText = string.Format(sql, (where.Length > 0 ? " WHERE " + whereStr : ""), "", "");

    //        using (DbDataReader dr = cmd.ExecuteReader())
    //        {
    //            while (dr.Read())
    //            {
    //                [TypeName] value = new [TypeName]();
    //                readRecord(dr, ref value);
    //                if (concurrency)
    //                    value.RecordOriginal = value.CloneT();
    //                list.Add(value);
    //            }
    //        }
    //    }
    //    return list;
    //}





    }

}
